package uk.ac.ncl.teach.ex.people;

/** 
 * Person - simple representation of a Person with name and age.
 *
 * @author Nick Cook &lt;nick.cook@ncl.ac.uk&gt;
 * @version $Revision: 1624 $<br />
 * $Date: 2011-01-17 12:20:26 +0000 (Mon, 17 Jan 2011) $<br />
 * Copyright (C) 2007 Newcastle University, UK
 */ 
public class Person {
    private final String name;
    private final int age;
       
    /**
     * Construct a Person given name and age.
     *
     * @param pName the name of the person
     * @param pAge the age of the person
     */
    public Person(String pName, int pAge) {
        System.out.println(getClass() 
            + " called Person constructor");
        name = pName;
        age = pAge;
     }

    /**
     * Get the <code>name</code> field.
     *
     * @return Returns the <code>name</code> field
     */
    public String getName() { return name; }

    /**
     * Get the <code>age</code> field.
     *
     * @return Returns the <code>age</code> field
     */
    public int getAge() { return age; }
    
    public void printDetails(){
    	System.out.println("Name: " + name);
    	System.out.println("Age: " + age);
    }
}
